package com.rocsun.product.controller;

import com.rocsun.product.Product;
import com.rocsun.product.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: rocsun-cloud-alibaba
 * @description:
 * @author: yx.guo
 * @create: 2025-08-28 10:32
 **/
@RestController
public class ProductController {

    @Autowired
    ProductService productService;

    @GetMapping("/product/{id}")
    public Product getProduct(@PathVariable("id") Long productId) {
        Product product = productService.getProduct(productId);
        return product;
    }

}
